Xbasic

{A}

Syntax

{A= Anchor_Tag }

Arguments

Anchor_Tag

Character. A text string that uniquely identifies an anchor point. Everything up to the next command becomes the anchor button.

Description

Specifies an anchor point.

Discussion

The {A} function specifies an anchor point, which is used along with the {T} command for exact positioning of controls. Anchor points are useful when you want to accurately position buttons on a dialog using owner draw strings with tab stops. A primary application is in creating list boxes with resizable columns.

Example

buttons1 = "{A=1}Sub-Button1{T=1.5}{A=2}Sub-Button2{T=3}{A=3}Sub-Button3"
ui_modeless_dlg_box("Anchor Points",<<%dlg%
{lf};
<%O={@@};B=M%=buttons1!button1>;
%dlg%,<<%code%
if a_dlg_button = "button1" then
    anchor = ui_dlg_control_anchor_from_pos("Anchor Points")
    ui_msg_box("Note","You just clicked on sub-button " + anchor + " in Button 1")
else
    ui_modeless_dlg_close("Anchor Points")
end if
%code%)

Limitations

Desktop applications only

See Also